include $(C2C_BASE_PATH)/comm/makefile.comm.v2

INSTALL_PATH = /usr/local/c2csvc/update
INCLUDE = -I../include \
                  -I./ \
                  -I../src \
                  -I$(B2B2C_BASE_PATH)/comm/export_include/ \
                  -I$(B2B2C_BASE_PATH)/comm/export_include/c2cplatform \
                  -I$(B2B2C_BASE_PATH)/comm/export_include/app_platform \
                  -I$(B2B2C_BASE_PATH)/comm/export_include/c2cplatform/component \
		  		  

	  
LIB = -L$(LIB_EXPORT_PATH) \
        $(LOG2_LIB) \

OUTPUT = helloworldao.so

VPATH = ../lib

SOURCES = helloworldao.cpp \
		helloworldao_adaptor.cpp 
OBJECTS=$(SOURCES:.cpp=.o)

all:$(OUTPUT) 

.SUFFIXES: .o .cpp
.cpp.o:
	$(CXX) $(CPPFLAGS) $(INCLUDE) -c $(filter %.cpp, $^) 

.o:
	$(CXX) $(CPPFLAGS) $(INCLUDE) -o $@ $^ 

$(OUTPUT): $(OBJECTS)
	$(CXX) $(CFLAGS) -fPIC -shared -o $@ $^ $(LIB)

clean:
	rm -f *.o *.so *.~ *.bak

install:
	cp -f $(OUTPUT) $(INSTALL_PATH)

dep:
	mkdep -p$(VPATH) $(INCLUDE) $(SOURCES) > .depend

ifneq ($(wildcard .depend),)
include .depend
endif

